<?php
$GetBlk = $GLOBALS['MYT']->db_array("SELECT CliNumero, CliBloqueado, blk_ID, blk_Informacion, lbk_Nivel FROM clientes
		LEFT OUTER JOIN hd_bloqueos ON blk_Codigo = CliNumero AND blk_STATUS = 1
		WHERE CliNumero = {$_GET['SearchValue']}");
form_pr('pp_act', '', '', 'post');
mn_field('hidden', 'ED', 'blk_Codigo', $GetBlk[1]['CliNumero'], '', '', '', '');
echo '<div id="ActionPanel" class="Line">';
if ($GetBlk[1]['CliBloqueado'] == 1) {
    mn_field('hidden', 'ED', 'blk_ID', $GetBlk[1]['blk_ID'], '', '', '', '');
    echo 'Informação do bloqueio: ' . $GetBlk[1]['blk_Informacion'];
    echo '<br>Nivel: ' . $GetBlk[1]['lbk_Nivel'];
    echo '<br>Motivo para desbloqueio: ';
    mn_field('text', 'ED', 'blk_CloseInformation', '', '200', '50', '', '');
    mn_field('hidden', 'ED', 'blk_TYPE', '1', '', '', '', '');
    mn_field('hidden', 'ED', 'blk_STATUS', '0', '', '', '', '');
    mn_field('button', 'ED', 'blk_prc', 'Desbloquear', '', '', '', 'SUBMIT"
		onclick="document.pp_act.action=\'_response/call.php?get=Operative/remittance&CL_BK\';
		subform(\'pp_act\',\'ActionPanel\');');
} else {
    echo 'Vai bloquear este cliente';
    echo '<p>Motivo para o bloqueio: ';
    mn_field('text', 'ED', 'blk_Information', '', '200', '50', '', '');
    mn_field('hidden', 'ED', 'blk_STATUS', '1', '', '', '', '');
    echo 'Nivel: ';
    mn_field('hselect', 'ED', 'blk_Nivel', '1', "Normal;Backoffice#1;2", '', '', '');
    mn_field('hidden', 'ED', 'blk_TYPE', '1', '', '', '', '');
    mn_field('button', 'ED', 'blk_prc', 'Bloquear', '', '', '', 'SUBMIT"
		onclick="document.pp_act.action=\'_response/call.php?get=Operative/remittance&CL_BK\';
		subform(\'pp_act\',\'ActionPanel\');');
}
echo '</div>
	</form>';
?>
<script charset="utf-8" type="text/javascript">
    Ext.onReady(function(){
        Ext.getCmp('win-statusbar').setStatus({text: 'Pronto'});
    });
</script>